import request from "@/utils/request";

/**
 * 客户画像列表
 * @returns { ClientPortrait }
 */
export const portraitList = () => {
  return request({
    url: "/crm/system/portraitList",
    method: "get"
  });
};

/**
 * 非系统字典分类和字典列表
 * @returns {*}
 */
export const sassDictListSys = () => {
  return request({
    url: "/crm/system/getSassDictListSys",
    method: "get"
  });
};

/**
 * sass——根据字典类型获取字典列表
 * @param { object } params
 * @param { object } params.dictType
 * @returns {*}
 */
export const dictList = params => {
  return request({
    url: "/crm/system/getDictDataList",
    method: "get",
    params
  });
};

/**
 * saas——业务类型获取客户预算
 */
export const getBudget = params => {
  return request({
    url: "/crm/system/getDictDataListByDictType",
    method: "get",
    params
  });
};

/**
 * 运营平台——根据字典类型获取字典列表
 * @param { string } dictType
 * @returns {*}
 */
export const selectDictDataByType = dictType => {
  return request({
    url: `/dbo/system/dict/data/type/${dictType}`,
    method: "get"
  });
};

/**
 * 支付方式
 */
export const payTypeDict = (data) => {
  return request({
    url: "/finance//dict/list",
    method: "post",
    data: { dictType: "pay_type",isShow:1,...data }
  })
}